
// 类型限制
interface Tel {
    tel:string
}


// interface TelCode {
//     tel:string,
//     telcode:string,
// }

// 接口继承
interface TelCode extends Tel {
    telcode:string,
}


interface Register extends Tel{
    password:string,
}

interface Login {
    loginname:string,
    password:string,
}

interface Result{
    code:string,
    message:string,
    data?:any []
}



import axios from "@/utils/request";

export const doCheckPhoneAPI = (data:Tel):Promise<Result> => axios.post("/user/docheckphone",data);
export const doSendMsgCodeAPI = (data:Tel):Promise<Result> => axios.post("/user/dosendmsgcode",data);
export const doCheckCodeAPI = (data:TelCode):Promise<Result> => axios.post("/user/docheckcode",data);
export const doFinishRegisterAPI = (data:Register):Promise<Result> => axios.post("/user/dofinishregister",data);

export const doLoginAPI = (data:Login):Promise<Result> => axios.post("/user/login",data);

// export const getAdminListAPI = (params) => axios.get("/admin/list",{
//     params:params,
// });
